//
//  HEIMGroupDetailsTitleCell.m
//  HealthElderly
//
//  Created by 吴欧 on 2021/11/22.
//  Copyright © 2021 honglutec. All rights reserved.
//

#import "HEIMGroupDetailsTitleCell.h"

@interface HEIMGroupDetailsTitleCell ()

@property (nonatomic, strong) UILabel *titleLb;
@property (nonatomic, strong) UIImageView *arrowView;


@end

@implementation HEIMGroupDetailsTitleCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self=[super initWithFrame:frame]) {
        self.contentView.backgroundColor = KWhiteColor;
        [self initUI];
    }
    return self;
}

- (void)initUI {

    _titleLb = [UILabel new];
    _titleLb.text = @"-";
    _titleLb.font = DYBlodFont(17);
    _titleLb.numberOfLines = 0;
    [self.contentView addSubview:_titleLb];
    
    _arrowView = [UIImageView new];
    _arrowView.contentMode = UIViewContentModeScaleAspectFill;
    _arrowView.image = IMAGE_NAMED(@"go_gray");
    [self.contentView addSubview:_arrowView];

    [_titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).mas_offset(15);
        make.left.equalTo(self.contentView).mas_offset(15);
        make.right.equalTo(_arrowView.mas_left).mas_offset(-0);
        make.bottom.equalTo(self.contentView).mas_offset(-15);
    }];
  
    [_arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.right.equalTo(self.contentView).mas_offset(-25);
        make.width.mas_offset(8);
        make.height.mas_offset(12);
    }];
}

- (void)configCellWithModel:(NSDictionary *)model indexPath:( NSIndexPath *) indexPath {
    _titleLb.text = model[@"title"];
}

@end
